Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1036 | Add program upload #1041

Merged
merged 8 commits into from
Oct 23, 2023
Merged

Issue 1036 | Add program upload #1041

merged 8 commits into from
Oct 23, 2023

Conversation

IceKhan13
Copy link
Member

@IceKhan13 IceKhan13 commented Oct 19, 2023

Summary

Adds program upload

Details and comments

Following build -> deploy -> run flow

serverless = QuantumServerless(Provider(...))

# BUILD
program = Program("awesome", entrypoint="program.py", ...)

# DEPLOY
serverless.upload(program)

# RUN
job = serverless.run("awesome", arguments={...})

serverless.get_programs()
# [Program("awesome")]

Old interface where we provide full Program definition on each run still works.

Example notebook: https://github.com/Qiskit-Extensions/quantum-serverless/blob/issue-1036/upload-programs/docs/getting_started/experimental/upload_program.ipynb


This is minimal implementation. Additional things that need to be added in following PRs:

  • version program with same names (currently we overwrite with latest one)
  • add namespaces to programs
  • make programs sharable

Closes #1036

@IceKhan13 IceKhan13 added the enhancement New feature or request label Oct 20, 2023
@IceKhan13 IceKhan13 marked this pull request as ready for review October 20, 2023 17:15
@IceKhan13 IceKhan13 requested review from akihikokuroda, psschwei and Tansito and removed request for akihikokuroda October 20, 2023 17:15
def files(self) -> List[str]:
"""Returns list of available files produced by programs to download."""
raise NotImplementedError

def download(self, file: str, download_location: str):
def file_download(self, file: str, download_location: str):
Copy link
Collaborator

@psschwei psschwei Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think anyone has implemented their own provider, so this probably is more academic than anything else, but for sake of completeness: should we deprecate the download function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is "experimental" feature :)

but anyway it is a good practice. Deprecated download in 6e690da

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to deprecate the other functions too? (*hides*)

Copy link
Member Author

@IceKhan13 IceKhan13 Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not, upload though. That is why I though it is a strange thing to deprecate half and not the other

@IceKhan13 IceKhan13 merged commit 291b9a5 into main Oct 23, 2023
6 checks passed
@IceKhan13 IceKhan13 deleted the issue-1036/upload-programs branch October 23, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add upload step to serverless.
2 participants